import Vue from 'vue'
import Vuex from 'vuex'
import gendanStore from './gendanStore'
import addressBook from './addressBook'
import orderStore from "./orderStore"
import userManage from "./userManage"
import customerSeasStore from "./customerSeasStore"
import goodsStore from "./goodsStore"
import moneyStore from "./moneyStore"
import staffStore from './staffStore'
import callbackStore from "./callbackStore"
import afterSaleStore from "./afterSaleStore"

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        // 搜索值
        searchVal: '',
    },
    mutations: {
        setSearchVal(state, val) {
            state.searchVal = val
        }
    },
    actions: {},
    modules: {
        gendanStore,
        addressBook,
        orderStore,
        userManage,
        customerSeasStore,
        goodsStore,
        moneyStore,
        staffStore,
        callbackStore,
        afterSaleStore
    }
})